cap gen g837_1_x=g836_2_x+g837_2_x+g835_2_x
cap gen g837_1_x=g836_2_x+g837_2_x
cap gen g837_1_f=g836_2_f+g837_2_f+g835_2_f
cap gen g837_1_f=g836_2_f+g837_2_f
cap gen g837_1_q=g836_2_q+g837_2_q+g835_2_q
cap gen g837_1_q=g836_2_q+g837_2_q
cap rename g920_1_x g920_x


gen durable=0
cap replace durable=durable+house_repair_material_x
cap replace durable=durable+g420_x
cap replace durable=durable+g421_x
cap replace durable=durable+g422_x
cap replace durable=durable+g423_x
cap replace durable=durable+g424_x
cap replace durable=durable+g425_x
cap replace durable=durable+g426_x
cap replace durable=durable+g427_x
cap replace durable=durable+furniture_durable_x
cap replace durable=durable+interior_x
cap replace durable=durable+beddings_x
cap replace durable=durable+g510_1_x
cap replace durable=durable+g510_2_x
cap replace durable=durable+g511_x
cap replace durable=durable+g512_x
cap replace durable=durable+g513_x
cap replace durable=durable+g514_x
cap replace durable=durable+g515_x
cap replace durable=durable+g516_x
cap replace durable=durable+g517_x
cap replace durable=durable+g519_x
cap replace durable=durable+g520_x
cap replace durable=durable+g521_x
cap replace durable=durable+g522_x
cap replace durable=durable+g523_x
cap replace durable=durable+g529_x
cap replace durable=durable+clothing_japanese_x
cap replace durable=durable+clothing_yo_huku_x
cap replace durable=durable+shirts_x
cap replace durable=durable+underwear_x
cap replace durable=durable+other_clothing_x
cap replace durable=durable+footwear_x
cap replace durable=durable+g712_x
cap replace durable=durable+g714_x
cap replace durable=durable+g719_x
cap replace durable=durable+automobile_autobike_x
cap replace durable=durable+g745_x
cap replace durable=durable+g751_x
cap replace durable=durable+g752_x
cap replace durable=durable+g766_x
cap replace durable=durable+g764_2_x
cap replace durable=durable+g764_1_x
cap replace durable=durable+g781_x
cap replace durable=durable+g800_x
cap replace durable=durable+g801_x
cap replace durable=durable+g802_x
cap replace durable=durable+g803_2_x
cap replace durable=durable+g803_1_x
cap replace durable=durable+g813_x
cap replace durable=durable+g810_x
cap replace durable=durable+g804_x
cap replace durable=durable+g811_1_x
cap replace durable=durable+g806_2_x
cap replace durable=durable+g805_x
cap replace durable=durable+g806_1_x
cap replace durable=durable+g807_x
cap replace durable=durable+g808_x
cap replace durable=durable+g809_x
cap replace durable=durable+g814_x
cap replace durable=durable+sports_gear_x
cap replace durable=durable+g837_1_x
cap replace durable=durable+g853_x
cap replace durable=durable+g854_x
cap replace durable=durable+g859_x
cap replace durable=durable+g900_x
cap replace durable=durable+g920_x
cap replace durable=durable+bags_x
cap replace durable=durable+g928_x
cap replace durable=durable+g930_x
cap replace durable=durable+g931_x
cap replace durable=durable+g932_x
gen storable=0
cap replace storable=storable+bb61_x
cap replace storable=storable+g131_x
cap replace storable=storable+g134_x
cap replace storable=storable+g133_x
cap replace storable=storable+g132_x
cap replace storable=storable+g135_x
cap replace storable=storable+g139_x
cap replace storable=storable+bb64_x
cap replace storable=storable+bb67_x
cap replace storable=storable+bb68_x
cap replace storable=storable+bb69_x
cap replace storable=storable+bb72_x
cap replace storable=storable+g231_x
cap replace storable=storable+g233_x
cap replace storable=storable+g234_x
cap replace storable=storable+g235_x
cap replace storable=storable+bb79_x
cap replace storable=storable+g291_x
cap replace storable=storable+g295_x
cap replace storable=storable+g296_x
cap replace storable=storable+g297_x
cap replace storable=storable+g299_x
cap replace storable=storable+bb84_x
cap replace storable=storable+oil_and_spice_x
cap replace storable=storable+g350_x
cap replace storable=storable+g346_x
cap replace storable=storable+g347_1_x
cap replace storable=storable+g357_x
cap replace storable=storable+g348_1_x
cap replace storable=storable+g349_x
cap replace storable=storable+g351_x
cap replace storable=storable+g352_x
cap replace storable=storable+g353_2_x
cap replace storable=storable+g353_1_x
cap replace storable=storable+g354_x
cap replace storable=storable+g355_x
cap replace storable=storable+g356_x
cap replace storable=storable+g359_x
cap replace storable=storable+g35X_x
cap replace storable=storable+g36X_x
cap replace storable=storable+g370_x
cap replace storable=storable+g375_x
cap replace storable=storable+g376_x
cap replace storable=storable+beverages_x
cap replace storable=storable+alcohol_x
cap replace storable=storable+other_fuel_x
cap replace storable=storable+g518_x
cap replace storable=storable+domestic_nondurable_x
cap replace storable=storable+texitile_x
cap replace storable=storable+medicines_x
cap replace storable=storable+g710_x
cap replace storable=storable+g713_x
cap replace storable=storable+g711_x
cap replace storable=storable+g731_x
cap replace storable=storable+g732_x
cap replace storable=storable+g734_x
cap replace storable=storable+g735_x
cap replace storable=storable+g750_x
cap replace storable=storable+stationary_x
cap replace storable=storable+g838_x
cap replace storable=storable+g839_x
cap replace storable=storable+g846_x
cap replace storable=storable+g845_x
cap replace storable=storable+g848_x
cap replace storable=storable+g841_x
cap replace storable=storable+g847_x
cap replace storable=storable+g843_x
cap replace storable=storable+g849_x
cap replace storable=storable+g842_x
cap replace storable=storable+g901_x
cap replace storable=storable+g902_x
cap replace storable=storable+g903_x
cap replace storable=storable+g904_x
cap replace storable=storable+g905_x
cap replace storable=storable+g908_2_x
cap replace storable=storable+g906_x
cap replace storable=storable+g907_1_x
cap replace storable=storable+g907_2_x
cap replace storable=storable+g908_1_x
cap replace storable=storable+g909_x
cap replace storable=storable+g910_x
cap replace storable=storable+g914_x
cap replace storable=storable+g911_x
cap replace storable=storable+g912_x
cap replace storable=storable+g913_x
cap replace storable=storable+tabacco_x
gen ndns=0
cap replace ndns=ndns+bb62_x
cap replace ndns=ndns+g130_x
cap replace ndns=ndns+fresh_fish_x
cap replace ndns=ndns+fresh_meat_x
cap replace ndns=ndns+g230_x
cap replace ndns=ndns+g232_x
cap replace ndns=ndns+g238_x
cap replace ndns=ndns+fresh_vegetables_x
cap replace ndns=ndns+bb80_x
cap replace ndns=ndns+g290_x
cap replace ndns=ndns+g292_x
cap replace ndns=ndns+g293_x
cap replace ndns=ndns+g294_x
cap replace ndns=ndns+fresh_fruits_x
cap replace ndns=ndns+g340_x
cap replace ndns=ndns+g341_x
cap replace ndns=ndns+g342_x
cap replace ndns=ndns+g343_x
cap replace ndns=ndns+g344_x
cap replace ndns=ndns+g347_2_x
cap replace ndns=ndns+g348_2_x
cap replace ndns=ndns+g345_x
cap replace ndns=ndns+bb90_x
cap replace ndns=ndns+g364_x
cap replace ndns=ndns+g365_x
cap replace ndns=ndns+g366_x
cap replace ndns=ndns+g367_x
cap replace ndns=ndns+g368_x
cap replace ndns=ndns+g369_x
cap replace ndns=ndns+g371_x
cap replace ndns=ndns+g372_x
cap replace ndns=ndns+g373_x
cap replace ndns=ndns+g37X_x
cap replace ndns=ndns+bb98_x
cap replace ndns=ndns+electricity_x
cap replace ndns=ndns+gas_x
cap replace ndns=ndns+water_x
cap replace ndns=ndns+hh_related_service_x
cap replace ndns=ndns+clothing_service_x
cap replace ndns=ndns+g730_x
cap replace ndns=ndns+g733_x
cap replace ndns=ndns+g736_x
cap replace ndns=ndns+g737_x
cap replace ndns=ndns+g738_x
cap replace ndns=ndns+g739_x
cap replace ndns=ndns+g753_x
cap replace ndns=ndns+g755_1_x
cap replace ndns=ndns+g756_1_x
cap replace ndns=ndns+g75X_x
cap replace ndns=ndns+g756_2_x
cap replace ndns=ndns+g75B_x
cap replace ndns=ndns+g754_x
cap replace ndns=ndns+g762_x
cap replace ndns=ndns+g763_x
cap replace ndns=ndns+g769_x
cap replace ndns=ndns+tutorial_x
cap replace ndns=ndns+g811_2_x
cap replace ndns=ndns+g812_x
cap replace ndns=ndns+g840_x
cap replace ndns=ndns+g844_x
cap replace ndns=ndns+g84X_x
cap replace ndns=ndns+g850_x
cap replace ndns=ndns+g851_x
cap replace ndns=ndns+g852_x
cap replace ndns=ndns+g860_x
cap replace ndns=ndns+package_tour_x
cap replace ndns=ndns+bb161_x
cap replace ndns=ndns+g880_1_x
cap replace ndns=ndns+entrance_fee_x
cap replace ndns=ndns+g888_x
cap replace ndns=ndns+g887_x
cap replace ndns=ndns+g886_2_x
cap replace ndns=ndns+g88X_x
cap replace ndns=ndns+g88Y_x
cap replace ndns=ndns+g889_x
cap replace ndns=ndns+personal_care_x
cap replace ndns=ndns+g934_x
cap replace ndns=ndns+g935_x
gen notax=0
cap replace notax=notax+g39X_x
cap replace notax=notax+rent_x
cap replace notax=notax+g429_x
cap replace notax=notax+medical_service_x
cap replace notax=notax+g755_2_x
cap replace notax=notax+g757_x
cap replace notax=notax+g758_x
cap replace notax=notax+g759_x
cap replace notax=notax+g760_1_x
cap replace notax=notax+g760_2_x
cap replace notax=notax+g761_x
cap replace notax=notax+school_fee_x
cap replace notax=notax+g780_x
cap replace notax=notax+all_others_x
cap replace notax=notax+pocket_money_x
cap replace notax=notax+social_expenses_x
cap replace notax=notax+remittance_x

gen rail_pass=0
cap replace rail_pass=rail_pass+g731_x
cap replace rail_pass=rail_pass+g732_x
cap replace rail_pass=rail_pass+g734_x
cap replace rail_pass=rail_pass+g735_x

*********************************************************************
*********************************************************************
*********************************************************************
**David Request***
*********************************************************************
*********************************************************************
*********************************************************************


gen household_appliances=furniture_durable_x-bb114_x

gen consumer_electronics=0
cap replace consumer_electronics=consumer_electronics+g764_1_x
cap replace consumer_electronics=consumer_electronics+g800_x
cap replace consumer_electronics=consumer_electronics+g801_x
cap replace consumer_electronics=consumer_electronics+g802_x
cap replace consumer_electronics=consumer_electronics+g803_2_x
cap replace consumer_electronics=consumer_electronics+g803_1_x
cap replace consumer_electronics=consumer_electronics+g810_x
cap replace consumer_electronics=consumer_electronics+g804_x
cap replace consumer_electronics=consumer_electronics+g811_1_x

gen furniture=0
cap replace furniture=furniture+bb114_x+interior_x+domestic_utencils_x

rename clothing_and_footwear_x clothing_and_footwear

rename automobile_autobike_x automobiles

gen domestic_goods=0
cap replace domestic_goods=domestic_goods+g518_x
cap replace domestic_goods=domestic_goods+domestic_nondurable_x

gen beverages=beverages_x+alcohol_x

gen personal_care_toiletries=medicines_x+medical_goods_x+toiletries_x

rename tabacco_x tobacco

gen food_within=cereals_x+fish_x+meat_x+dairy_x+vegetable_x+fruits_x+snack_x+cooked_food_x
gen seasonings = oil_and_spice_x

gen ndns1=0

cap replace ndns1=ndns1+bb62_x
cap replace ndns1=ndns1+g130_x
cap replace ndns1=ndns1+fresh_fish_x
cap replace ndns1=ndns1+fresh_meat_x
cap replace ndns1=ndns1+g230_x
cap replace ndns1=ndns1+g232_x
cap replace ndns1=ndns1+g238_x
cap replace ndns1=ndns1+fresh_vegetables_x
cap replace ndns1=ndns1+bb80_x
cap replace ndns1=ndns1+g290_x
cap replace ndns1=ndns1+g292_x
cap replace ndns1=ndns1+g293_x
cap replace ndns1=ndns1+g294_x
cap replace ndns1=ndns1+fresh_fruits_x
cap replace ndns1=ndns1+g340_x
cap replace ndns1=ndns1+g341_x
cap replace ndns1=ndns1+g342_x
cap replace ndns1=ndns1+g343_x
cap replace ndns1=ndns1+g344_x
cap replace ndns1=ndns1+g347_2_x
cap replace ndns1=ndns1+g348_2_x
cap replace ndns1=ndns1+g345_x
cap replace ndns1=ndns1+bb90_x
cap replace ndns1=ndns1+g364_x
cap replace ndns1=ndns1+g365_x
cap replace ndns1=ndns1+g366_x
cap replace ndns1=ndns1+g367_x
cap replace ndns1=ndns1+g368_x
cap replace ndns1=ndns1+g369_x
cap replace ndns1=ndns1+g371_x
cap replace ndns1=ndns1+g372_x
cap replace ndns1=ndns1+g373_x
cap replace ndns1=ndns1+g37X_x

cap replace ndns1=ndns1+g840_x 


gen ndns2=0

cap replace ndns2=ndns2+electricity_x
cap replace ndns2=ndns2+gas_x
cap replace ndns2=ndns2+water_x

gen ndns3a=0


cap replace ndns3a=ndns3a+clothing_service_x
cap replace ndns3a=ndns3a+g755_1_x
cap replace ndns3a=ndns3a+g756_1_x
cap replace ndns3a=ndns3a+g756_2_x
cap replace ndns3a=ndns3a+g754_x
cap replace ndns3a=ndns3a+g769_x
cap replace ndns3a=ndns3a+g811_2_x
cap replace ndns3a=ndns3a+g812_x
cap replace ndns3a=ndns3a+g844_x
cap replace ndns3a=ndns3a+g84X_x
cap replace ndns3a=ndns3a+g851_x
cap replace ndns3a=ndns3a+g852_x
cap replace ndns3a=ndns3a+g887_x
cap replace ndns3a=ndns3a+g886_2_x
cap replace ndns3a=ndns3a+g88X_x
cap replace ndns3a=ndns3a+g889_x
cap replace ndns3a=ndns3a+g934_x
cap replace ndns3a=ndns3a+g935_x

gen ndns3b=0
cap replace ndns3b=ndns3b+g75X_x
cap replace ndns3b=ndns3b+g762_x
cap replace ndns3b=ndns3b+g763_x
cap replace ndns3b=ndns3b+tutorial_x
cap replace ndns3b=ndns3b+g850_x
cap replace ndns3b=ndns3b+bb161_x
cap replace ndns3b=ndns3b+g880_1_x
cap replace ndns3b=ndns3b+g888_x
cap replace ndns3b=ndns3b+g88Y_x

gen ndns3c=0

cap replace ndns3c=ndns3c+hh_related_service_x
cap replace ndns3c=ndns3c+g753_x

cap replace ndns3c=ndns3c+entrance_fee_x
cap replace ndns3c=ndns3c+g736_x
cap replace ndns3c=ndns3c+g737_x
cap replace ndns3c=ndns3c+g730_x
cap replace ndns3c=ndns3c+g733_x
cap replace ndns3c=ndns3c+g738_x
cap replace ndns3c=ndns3c+g739_x
cap replace ndns3c=ndns3c+g75B_x
cap replace ndns3c=ndns3c+bb98_x
cap replace ndns3c=ndns3c+g860_x
cap replace ndns3c=ndns3c+package_tour_x
cap replace ndns3c=ndns3c+personal_care_x

